package com.ethan.lotgateway.netty.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class MqSender {
    @Autowired
    private AmqpTemplate rabbitTemplate;
    public void sendMsg(String routing,String content){

        log.info("发送消息："+content);
        rabbitTemplate.convertAndSend("exchange_lot",routing,content);
    }
}
